home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 10324 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++
  4. Subject: Re: C/C++ knocks the crap out of Ada
  5. Date: 7 Mar 1996 09:05:29 -0800
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4hn50pINN4r8@keats.ugrad.cs.ubc.ca>
  8. References: <00001a73+00002504@msn.com> <4h7jskINNnph@anvil.ugrad.cs.ubc.ca> <dewar.826146475@schonberg> <4hmlca$a30@solutions.solon.com>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4hmlca$a30@solutions.solon.com>,
  12. Peter Seebach <seebs@solutions.solon.com> wrote:
  13.  >In article <dewar.826146475@schonberg>, Robert Dewar <dewar@cs.nyu.edu> wrote:
  14.  >>I guess that means "rarely used in the academic programs that I am fiddling
  15.  >>with". In real life of course, they are a vital, and widely used part of the
  16.  >>language.
  17.  >
  18.  >I have to admit, I've only seen them used in NetHack.  No other code I've
  19.  >ever read used bitfields.  :)
  20.  
  21.  >They'd probably show up a lot more with industrial or embedded systems.
  22.  
  23. I have seen them used in a very implementation specific way as a method to
  24. access various status bits of a certain device on a Sun 3 machine, using the
  25. bitfield structure as a syntactically convenient lvalue to ``go through''.
  26.  
  27. The only thing that bitfields are good for, portably, is optimizing the
  28. storage of small signed or unsigned integers or flag sets, at some
  29. computational expense.
  30. -- 
  31.  
  32.